package com.ruoyi.web.core.netty;

public enum IdEnum {
  LOGIN("554C", "登录"),

  LOGOUT("5545", "登出"),

  CHECK_UPDATE("4901", "请求固件信息"),

  DOWNLOAD("4902", "下载固件数据"),

  OPEN("4903", "执行固件"),

  DOWNLOAD_FILE("4904", "请求下载文件");

  private final String value;
  private final String desc;

  IdEnum(String value, String desc) {
    this.value = value;
    this.desc = desc;
  }

  public String getValue() {
    return value;
  }

  public String getDesc() {
    return desc;
  }

  public static String getDesc(String value) {
    for (IdEnum e : IdEnum.values()) {
      if (e.getValue().equals(String.valueOf(value))) {
        return e.getDesc();
      }
    }
    return null;
  }
}
